package org.smartopen.unionpay.openapi.config;

import feign.RequestInterceptor;
import lombok.RequiredArgsConstructor;
import org.smartopen.unionpay.openapi.aspect.OpenApiAspect;
import org.smartopen.unionpay.openapi.component.UnionPayOpenApiProperties;
import org.smartopen.unionpay.openapi.constant.UnionPayConstant;
import org.smartopen.unionpay.openapi.interceptor.UnionPayOpenApiRequestInterceptor;
import org.smartopen.unionpay.openapi.service.UnionPayService;
import org.smartopen.unionpay.openapi.service.feigin.RemoteUnionPayOpenApiService;
import org.smartopen.unionpay.openapi.service.impl.UnionPayServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@RequiredArgsConstructor
public class UnionPayOpenApiConfiguration {


    @Bean
    public RequestInterceptor requestInterceptor(UnionPayOpenApiProperties openApiProperties) {
        return new UnionPayOpenApiRequestInterceptor(openApiProperties);
    }

}